package com.pinyoumei.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping("/item")
public class ItemController {
	
	@RequestMapping("/phone")
	public String mobile(@RequestParam("itemId")String itemId,Model model){
		model.addAttribute("itemId",itemId);
		return "mobile/"+itemId;
	}
	
	@RequestMapping("/earphone")
	public String ear(@RequestParam("itemId")String itemId,Model model){
		model.addAttribute("itemId",itemId);
		return "earphone/"+itemId;
	}

}
